<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryRef"
      :inline="true"
    >

          <el-form-item label="选择时间" style="width: 450px;">
            <el-date-picker
                v-model="dateRange"
                value-format="YYYY-MM-DD HH:mm:ss"
                type="datetimerange"
                range-separator="-"
                start-placeholder="开始时间"
                end-placeholder="结束时间"
            ></el-date-picker>
          </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="Search" @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>


    <el-table
      v-loading="loading"
      :data="orderList"

    >

      <el-table-column
        label="用户id"
        width="80"
        prop="mem_id"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="部门"
        width="150"
        prop="depart"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="姓名"
        width="100"
        prop="name"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="账号"
        width="150"
        prop="account"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="业绩"
        width="200"
        prop="ach"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="关系链"

        prop="relation"
        align="center"
        :show-overflow-tooltip="true"

      />
      <el-table-column
        label="备注"
        width="300"
        prop="remark"
        align="center"
        :show-overflow-tooltip="true"

      />
      <!-- <el-table-column
        label="用户手机账号"
        align="center"
        width="120"
        :show-overflow-tooltip="true"
        fixed
      >
        <template #default="scope">
          <span> {{scope.row.mobile}}</span>
        </template>
      </el-table-column> -->

      <!-- <el-table-column
        label="申请时间"
        align="center"
        prop="createTime"
        width="180"
        :show-overflow-tooltip="true"
      >
        <template #default="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column> -->



    </el-table>

    <!-- <pagination
      v-show="total > 0"
      :total="total"
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      @pagination="getList"
    /> -->



  </div>
</template>

<script setup name="depPerformance">
import { getDepartmentAchList } from "@/api/profitPrepare/depPerformance";
const { proxy } = getCurrentInstance();

const orderList = ref([]);


const loading = ref(true);

const total = ref(0);


const dateRange = ref([]);





const data = reactive({
  form: {},
  queryParams: {
   pageNum: 1,
   pageSize: 10
 },

});

const { queryParams } = toRefs(data);






/** 查询订单列表 */
function getList() {
  loading.value = true;
  getDepartmentAchList(proxy.addDateRange(queryParams.value, dateRange.value)).then((response) => {
    orderList.value = response.data;
    loading.value = false;
  });
}


/** 搜索按钮操作 */
function handleQuery() {
  queryParams.value.pageNum = 1;
  getList();
}


/** 重置按钮操作 */
function resetQuery() {
  dateRange.value = [];
  proxy.resetForm("queryRef");
  handleQuery();
}







getList();
</script>
<style lang="scss" scoped>
.ml80{
  margin-left: 80px;
}
</style>
